/**
 * <p>Copyright (c) 2011 深圳市鹏途信息技术有限公司 </p>
 * <p>				   All right reserved. 		     </p>
 * 
 * <p>项目名称 ： 	东莞交通工程质量监督综合业务系统        </p>
 * <p>创建者   :	ce 
 * 
 * <p>描   述  :  来源于开源项目  	huangping  用于支持JfreeChartUtil.java  </p>
 * 
 * <p>最后修改 : $: 2011-8-17-下午03:31:12 v 1.0.0	 ce   $     </p>
 * 
*/
package com.pengtu.integration.chart;

import java.io.OutputStream;

public class JfreeChartBean {
	/**
	 * 折线图 1
	 */
	public static final String LINE_CHARTTYPE = "1";
	/**
	 * 柱状图 2
	 */
	public static final String BAR_CHARTTYPE = "2";
	/**
	 * 堆栈柱状图3
	 */
	public static final String STACKEDBAR_CHARTTYPE = "3";
	/**
	 * 饼图4
	 */
	public static final String PIE_CHARTTYPE = "4";
	/**
	 * 横向图5
	 */
	public static final String HORIZONTALBAR_CHARTTYPE = "5";
	/**
	 * 输出流1
	 */
	public static final String STREAM_OUTPUTTYPE = "1";
	/**
	 * 输出文件2
	 */
	public static final String FILE_OUTPUTTYPE = "2";
	
	private static final int DEFAULT_IMG_HEIGHT = 320;

	private static final int DEFAULT_IMG_WIDTH = 680;
	
	private String title;
	private String[] rowKeys;
	private String[] columnKeys;
	private String xTitle;
	private String yTitle;
	private boolean _3D;

	private double[][] dataList;



	private int width  = DEFAULT_IMG_WIDTH;
	private int height = DEFAULT_IMG_HEIGHT;

	/**
	 * 图表类型 1-折线图 2-柱状图 3-堆栈柱状图 4-饼图 5-横向图
	 */
	private String chartType ;
	/**
	 * 输出类型 1-流输出 2-生成文件
	 */
	private String outPutType ;
	private String fileName;
	private OutputStream out;
	private String[] keys;// 生成饼图使用
	private double[] data;// 生成饼图使用
	
	public JfreeChartBean(){
		 
	}
  
	/**
	 * 柱状图  生成模式 文件输出模式
	 * JfreeChartBean.
	 *
	 * @param title
	 * @param rowKeys
	 * @param columnKeys
	 * @param xTitle
	 * @param yTitle
	 * @param dataList
	 * @param width
	 * @param height
	 * @param fileName
	 */
	public JfreeChartBean(String title,String xTitle, String yTitle,double[][] dataList, String[] rowKeys, String[] columnKeys, int width,
			int height, String fileName) {
		this.chartType  =  BAR_CHARTTYPE;
		this.outPutType = FILE_OUTPUTTYPE;
		this.title = title;
		this.rowKeys = rowKeys;
		this.columnKeys = columnKeys;
		this.xTitle = xTitle;
		this.yTitle = yTitle;
		this.dataList = dataList;
		this.width = width;
		this.height = height;
		this.fileName = fileName;
	}
	
	
	public JfreeChartBean(String title, String[] rowKeys, String[] columnKeys,
			String xTitle, String yTitle, double[][] dataList, int width,
			int height, String chartType, String outPutType, String pathName,
			String fileName, OutputStream out, String[] keys, double[] data) {
		this.title = title;
		this.rowKeys = rowKeys;
		this.columnKeys = columnKeys;
		this.xTitle = xTitle;
		this.yTitle = yTitle;
		this.dataList = dataList;
		this.width = width;
		this.height = height;
		this.chartType = chartType;
		this.outPutType = outPutType;
		this.fileName = fileName;
		this.out = out;
		this.keys = keys;
		this.data = data;
	}

	public String getChartType() {
		return this.chartType;
	}

	public void setChartType(String chartType) {
		this.chartType = chartType;
	}

	public String getOutPutType() {
		return this.outPutType;
	}

	public void setOutPutType(String outPutType) {
		this.outPutType = outPutType;
	}

	public String getFileName() {
		return this.fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public OutputStream getOut() {
		return this.out;
	}

	public void setOut(OutputStream out) {
		this.out = out;
	}

	public int getWidth() {
		return this.width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getHeight() {
		return this.height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String[] getRowKeys() {
		return this.rowKeys;
	}

	public void setRowKeys(String[] rowKeys) {
		this.rowKeys = rowKeys;
	}

	public String[] getColumnKeys() {
		return this.columnKeys;
	}

	public void setColumnKeys(String[] columnKeys) {
		this.columnKeys = columnKeys;
	}

	public String getXTitle() {
		return this.xTitle;
	}

	public void setXTitle(String title) {
		xTitle = title;
	}

	public String getYTitle() {
		return this.yTitle;
	}

	public void setYTitle(String title) {
		yTitle = title;
	}

	public double[][] getDataList() {
		return this.dataList;
	}

	public void setDataList(double[][] dataList) {
		this.dataList = dataList;
	}

	public String[] getKeys() {
		return this.keys;
	}

	public void setKeys(String[] keys) {
		this.keys = keys;
	}

	public double[] getData() {
		return this.data;
	}

	public void setData(double[] data) {
		this.data = data;
	}

	public boolean is3D() {
		return _3D;
	}

	public void set3D(boolean _3d) {
		_3D = _3d;
	}
}
